import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { DefaultComponent } from './default.component';

const routes: Routes = [{
    path: '' , component: DefaultComponent ,
    children: [
      {
        path: 'login' , loadChildren: () => import('../login/login.module').then(m => m.LoginModule)
      },
      {
        path: 'commodity-details' , loadChildren: () => import('../commodity-details/commodity-details.module')
              .then(m => m.CommodityDetailsModule)
      },
      {
        path: 'my-order', loadChildren: () => import('../person-center/my-order/my-order.module').then(m => m.MyOrderModule)
      },
      {
        path: 'receiving-address',
        loadChildren: () => import('../person-center/receiving-address/receiving-address.module').then(m => m.ReceivingAddressModule)
      },
      {
        path : 'about-us' , loadChildren: () => import('../person-center/about-us/about-us.module').then(m => m.AboutUsModule)
      },
      {
        path: 'transaction-details',
        loadChildren: () => import('../person-center/transaction-details/transaction-details.module').then(m => m.TransactionDetailsModule)
      }],
  }];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DefaultRoutingModule { }
